package com.gsdse.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gsdse.pojo.User;
import com.gsdse.pojo.wxuser;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface WxuserDao extends BaseMapper<wxuser> {
    @Insert("insert into wxuser values (null, #{openid}, #{nickName}, null, null)")
    Boolean InsertWxuser(wxuser wxuser);

    @Select("select * from wxuser where openid = #{openid}")
    wxuser SelectWxuser(String openid);

    @Update("update wxuser set nickName= #{nickName} , avatarUrl = #{avatarUrl} where openid = #{openid}")
    Boolean UpdateWxuser(wxuser wxuser);


}
